/**
 ******************************************************************************
 * @file    bmp280.h
 * @author  Hsiang Hsu, livmee
 * @version V1.0.0
 * @date    2025-05-24
 * @brief   This file contains the headers of the bmp280 sensor.
 ******************************************************************************
 **/

#ifndef __BMP280_H
#define __BMP280_H

#ifdef __cplusplus
extern "C"
{
#endif

/* Includes ------------------------------------------------------------------*/
#include "main.h"
/* Exported typedef -----------------------------------------------------------*/
typedef struct
{
  float temperature;
  float pressure;
} BMP280_Data_t;
/* Exported define ------------------------------------------------------------*/
/* Exported macro -------------------------------------------------------------*/
/* Exported variables ---------------------------------------------------------*/
/* Exported function prototypes -----------------------------------------------*/

extern void BMP_Init(void);
extern void SwapByteSPI1(uint8_t tx_data, uint8_t addr, uint8_t rwflag, uint8_t *rx_buf);
extern void BMPGetData(BMP280_Data_t *pbuf);
/* Exported functions ---------------------------------------------------------*/

#ifdef __cplusplus
}
#endif

#endif

/* end------------------------ -----------------------------------------------*/
